package edu.zut.hb.software.base.service;

import edu.zut.hb.software.base.domain.BaseEntity;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

import java.io.Serializable;

public interface GenericManager<T extends BaseEntity<PK>, PK extends Serializable>{

    public void delete(PK id);

    public void deleteAll();

    public Iterable<T> findAll();

    public Page<T> findAll(Pageable page);

    public T findById(PK id);

    public Iterable<T> save(Iterable<T> entities);

    public T save(T entity);

    public long count();
}
